﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true" CodeBehind="MyStock.aspx.cs" Inherits="MLM.AdminCP.Pages.MyStock" meta:resourcekey="PageResource1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    My Stock
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<telerik:RadGrid ID="RadGroupUserStocksGrid" runat="server" AllowFilteringByColumn="True"
        DataSourceID="GroupGroupUserStocksEds" AllowPaging="True" 
        AllowSorting="True" GridLines="None"
        ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" 
        meta:resourcekey="RadGroupUserStocksGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <Selecting AllowRowSelect="True"></Selecting>
            <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="UserStockID" DataSourceID="GroupGroupUserStocksEds"
             ShowHeadersWhenNoRecords="true">           
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true">
                </CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="ProductBas.Name" HeaderText="Product Name"
                    ReadOnly="True" SortExpression="ProductBas.Name" 
                    UniqueName="ProductBasName" meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>      
                <telerik:GridBoundColumn DataField="StockAvaiable" HeaderText="Stock Avaiable"
                    ReadOnly="True" SortExpression="StockAvaiable" UniqueName="StockAvaiable" 
                    meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>    
                 <telerik:GridCheckBoxColumn  DataField="IsShowOnShop" HeaderText="Show On Shop"
                    SortExpression="IsShowOnShop" UniqueName="IsShowOnShop" 
                    DataType="System.Boolean" meta:resourcekey="GridCheckBoxColumnResource1">
                </telerik:GridCheckBoxColumn >       
                <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                    UniqueName="EditCommandColumn" 
                    meta:resourcekey="GridEditCommandColumnResource1">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                </telerik:GridEditCommandColumn>   
            </Columns>           

<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
        </MasterTableView>        
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="GroupGroupUserStocksEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="UserStocks" 
        Include="ProductBas" AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:SessionParameter runat="server" Name="UserID" SessionField="CurrentUserId" Type="Int64"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="GroupCountryEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableFlattening="False" EntitySetName="Countries"
        EntityTypeFilter="Country" Select="it.[CountryID], it.[Name]">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="GroupRolesEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableFlattening="False" 
        EntitySetName="Roles">
    </asp:EntityDataSource>
</asp:Content>
